package com.zifuchuan.stringtest;

import java.util.Scanner;

/*
需求：键盘录入一个字符串，使用程序实现在控制台遍历该字符串
 */
public class Test02_02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        String s = sc.nextLine();

        for (int i = 0; i < s.length(); i++) {

            //  chars[i]
            System.out.println(s.charAt(i));
        }

    }
}
